//
//  DestinationSecPostTableViewCell.m
//  EDPS
//
//  Created by Neil on 15/11/26.
//  Copyright © 2015年 张维扬. All rights reserved.
//

#import "DestinationSecPostTableViewCell.h"

@implementation DestinationSecPostTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _titleLable = [[UILabel alloc]init];
        _titleLable.textAlignment = NSTextAlignmentCenter;
//        _titleLable.backgroundColor = [UIColor grayColor];
        _titleLable.text = @"━━━━·推荐地点·━━━━";
        _titleLable.textColor = [UIColor redColor];
        _titleLable.font = [UIFont systemFontOfSize:15];
        
        [self.contentView addSubview:_titleLable];
        
        _tourPlaceButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _tourPlaceButton.layer.cornerRadius = (self.contentView.frame.size.height - 10) / 2;
        _tourPlaceButton.layer.masksToBounds = YES;
        [_tourPlaceButton setImage:[UIImage imageNamed:@"iconfont-diqiu.png"] forState:UIControlStateNormal];
//        _tourPlaceButton.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_tourPlaceButton];
        
        _bestTourButton  = [UIButton buttonWithType:UIButtonTypeCustom];
        _bestTourButton.layer.cornerRadius = (self.contentView.frame.size.height - 10) / 2;
        _bestTourButton.layer.masksToBounds = YES;
        [self.contentView addSubview:_bestTourButton];
        [_bestTourButton setImage:[UIImage imageNamed:@"iconfont-jiangbei-2.png"] forState:UIControlStateNormal];
        
}
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];

    _titleLable.frame = CGRectMake(self.contentView.frame.size.width - 280, 0, 200, self.contentView.frame.size.height);
    
    _tourPlaceButton.frame = CGRectMake(30, 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10);
    
    _bestTourButton.frame = CGRectMake(self.contentView.frame.size.width - 30 - (self.contentView.frame.size.height - 10), 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10);
}

@end
